<template>
  <div class="wrapper">
    <swiper :options="swiperOption" >
    <!-- slides -->
    <swiper-slide v-for="item of swiperList" :key="item.id">
      <img class="swiper-img"  :src="item.url">
      </swiper-slide>
    <!-- Optional controls -->
    <div class="swiper-pagination"  slot="pagination"></div>
  </swiper>
  </div>
</template>
<script>
export default {
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true,
        autoplay: 2000,
        autoplayDisableOnInteraction: false
      },
      swiperList: [
        {
          id: '001',
          url:
            'https://dimg04.c-ctrip.com/images/700m0r000000haf6z6D9D_1242_470_191.jpg'
        },
        {
          id: '002',
          url:
            'https://dimg04.c-ctrip.com/images/70040s000000i78om5E8F_480_182_191.jpg'
        },
        {
          id: '003',
          url:
            'https://dimg04.c-ctrip.com/images/700r0s000000hw8l0CA21_1242_470_191.jpg'
        }
      ]
    }
  }
}
</script>
<style scoped>
.swiper-img {
  width: 100%;
}
.wrapper {
  background: #eee;
}
.wrapper >>> .swiper-pagination-bullet-active {
  background: #fff !important;
}
</style>
